-
Notifications
You must be signed in to change notification settings - Fork 4
lib: introduce support for BOX
records with header type6
#32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a92c566
to
0aa74d4
Compare
lib/src/record.rs
Outdated
} | ||
|
||
impl Record { | ||
pub fn update_inherited_header(&mut self, inherited_header: Option<InheritedHeader>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we limit the visibility of this method to the crate (pub(crate)
)? I don't see a need to add this to the public API.
Also, since the fields of the struct are public, there is no real reason to encapsulate this logic in a method.
0aa74d4
to
6cd4530
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it looks good to me. I just have a few comments.
lib/src/region.rs
Outdated
@@ -35,6 +35,13 @@ impl Region { | |||
} | |||
} | |||
|
|||
pub(crate) fn update_socket_and_die(&mut self, socket_id: u8, die_id: u8) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can call this function set_socket_and_die_ids()
instead
lib/tests/record.rs
Outdated
let record = Record { | ||
header, | ||
data, | ||
..Record::default() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..Default::default()
This patch includes decoding support for any box record type with a header type6. When a box record contains other records, these records inherit some values from the box header, one example is the presence of `die_id` and `socket_id` which are part of header type6. Signed-off-by: Rivas Paz, Jose L <jose.l.rivas.paz@intel.com>
6cd4530
to
f4e3b5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good to me now. Thank you for the PR!
This patch includes decoding support for any box record type with a header type6. When a box record contains other records, these records inherit some values from the box header, one example is the presence of
die_id
andsocket_id
which are part of header type6.